package Part2;


public class Myclass2 {
    public int x;

    static void myMethod() {
        System.out.println("我被执行了！");
    }

    public Myclass2(int y){
        System.out.println("构造Myclass2");
        x=y;
    }

    public Myclass2(){
    }
    public static void main(String[] args) {
        Myclass2 myClass = new Myclass2();
        int y = 40;
        myClass.x = y;
        System.out.println(myClass.x);
        myMethod();
        Myclass2 myclass2 = new Myclass2(5);
        System.out.println(myclass2.x);

    }
}
